{% extends 'base/base.html' %}
{% block title %} 资源详情 {% endblock title %}
{% block stylesheets %}
    {{ block.super }}
{% endblock %}
{% block content %}
<div class="right_col" role="main">
    <div class="">
        <div class="clearfix"></div>

        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>资产详细信息 <small>|&nbsp;<a href="{% url 'server_info' %}">服务器资产</a></small></h2>
                        <ul class="nav navbar-right panel_toolbox">
                            <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            </li>
                            <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                            <ul class="dropdown-menu" role="menu">
                                <li><a href="#">Settings 1</a>
                                </li>
                                <li><a href="#">Settings 2</a>
                                </li>
                            </ul>
                            </li>
                            <li><a class="close-link"><i class="fa fa-close"></i></a>
                            </li>
                        </ul>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                    <div><small>带 * 号项可单击进行编辑</small><br /></div>
                        <table id="datatable" class="table table-striped table-bordered">
                            <thead>
                                {% for i in server_detail %}
                                <tr>
                                    <th>主机名</th>
                                    <td>{{ i.hostname }} 【{{ i.nodename }}】</td>
                                </tr>
                                <tr>
                                    <th>操作系统</th>
                                    <td>{{ i.os }}</td>
                                </tr>
                                <tr>
                                    <th>内核</th>
                                    <td>{{ i.kernel }}</td>
                                </tr>
                                <tr>
                                    <th>Salt版本</th>
                                    <td>{{ i.saltversion }}</td>
                                </tr>
                                <tr>
                                    <th>ZeroMQ版本</th>
                                    <td>{{ i.zmqversion }}</td>
                                </tr>
                                <tr>
                                    <th>Shell</th>
                                    <td>{{ i.shell }}</td>
                                </tr>
                                <tr>
                                    <th>Locale</th>
                                    <td>{{ i.locale|linebreaksbr }}</td>
                                </tr>
                                <tr>
                                    <th>SELinux</th>
                                    <td>{{ i.selinux|linebreaksbr }}</td>
                                </tr>
                                <tr>
                                    <th>CPU型号</th>
                                    <td>{{ i.cpu_model }}</td>
                                </tr>
                                <tr id="{{ i.pk }}">
                                    <th>CPU线程 *</th>
                                    <td><span class="edit" field="cpu_nums">{{ i.cpu_nums }}</span></td>
                                </tr>
                                <tr id="{{ i.pk }}">
                                    <th>内存 *</th>
                                    <td><span class="edit" field="memory">{{ i.memory }}</span></td>
                                </tr>
                                <tr id="{{ i.pk }}">
                                    <th>硬盘分区 *</th>
                                    <td><span class="edit" field="disk">{{ i.disk|linebreaksbr }}</span></td>
                                </tr>
                                <tr>
                                    <th>网络接口</th>
                                    <td>{{ i.network|linebreaksbr }}</td>
                                </tr>
                                <tr id="{{ i.pk }}">
                                    <th>平台 *</th>
                                    <td><span class="edit" field="virtual">{{ i.virtual }}</span></td>
                                </tr>
                                <tr id="{{ i.pk }}">
                                    <th>序列号 *</th>
                                    <td><span class="edit" field="sn">{{ i.sn }}</span></td>
                                </tr>
                                <tr id="{{ i.pk }}">
                                    <th>厂商型号 *</th>
                                    <td><span class="edit" field="manufacturer">{{ i.manufacturer }}</span><br /><span class="edit" field="productname">{{ i.productname }}</span></td>
                                </tr>
                                <tr id="{{ i.pk }}">
                                    <th>IDC机房 *</th>
                                    <td><span class="editSelect" field="idc">{{ i.idc }}</span></td>
                                </tr>
                                {% endfor %}
                            </thead>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
{% block javascripts %}
    {{ block.super }}
{% endblock %}